In a device for measuring and inspecting a pattern formed on a semiconductor wafer, a process is performed in which the field of view of the inspection device is aligned with a desired measuring position using template matching technology (see Non Patent Literature 1 indicated below) for matching using a template. In Patent Literature 1 indicated below, an example of such template matching method is described. The template matching process refers to a process of finding a region that most closely matches a pre-registered template image from an image as a search object.
In a specific example of the inspection device using template matching, a scanning electron microscope is used to measure the pattern on the semiconductor wafer. In the inspection device, while the field of view of the device is moved to a rough position for measuring, a large error is often caused on an image taken at a high magnification ratio by the electron microscope with only the stage positioning accuracy. Further, the wafer may not be placed on the stage in the same direction every time, and the coordinate system (such as the direction in which wafer chips and the like are arranged) of the wafer placed on the stage may not be completely aligned with the direction in which the stage is driven, creating causes for the error on the image taken at high magnification ratio by the electron microscope.
In order to obtain an electron microscope image of high magnification ratio at a desired observation position, the electron beam may be deflected by a fine amount (such as on the order of not more than several tens of μm) so as to irradiate a target position on the observed sample (which may be referred to as “beam shift”). However, even when the beam shift is performed, an error from the desired observation position may be caused with regard to the irradiation position with only the accuracy of beam deflection control. In order to perform measurement and inspection at an accurate position while correcting for such various errors, template matching is performed.
Specifically, alignment is performed in multiple stages including alignment using an optical camera having a lower magnification ratio than an electron microscope image, and alignment in an electron microscope image. For example, when the coordinate system of a wafer placed on the stage is aligned using the optical camera, images of a plurality of chips at positions spaced apart from each other on the wafer (such as chips at the left and right ends of the wafer) are used for alignment. First, a unique identical pattern in each chip or nearby (a pattern at the relatively same position in the respective chips) is registered as a template (the pattern used for the registration is often the one created as an optical alignment pattern on the wafer).
Then, the stage is moved so as to image the pattern for which template registration has been performed in each chip, and an image is acquired from each chip. The acquired images are subjected to template matching. Based on the respective matching positions obtained as a result of the matching, a stage movement error amount is calculated, and the coordinate system for stage movement and the wafer coordinate system are aligned using the error amount as a stage movement correction value. In the electron microscope alignment performed next, a unique pattern that is the closest to the measuring position is registered in advance as a template, and the relative coordinates of the measuring position as viewed from the template are stored. When the measuring position is determined from the image taken by the electron microscope, template matching is performed in the taken image to determine a matching position, and the measuring position is determined by moving from the matching position by the relative coordinates that have been stored. By utilizing such template matching, the field of view of the device is moved to the desired measuring position.
When the above-described stage movement error or the beam shift error is large, the alignment pattern may not be included within the image taken by the electron microscope. In this case, a process (measurement interruption) may be performed to again search for the alignment pattern around the imaged position (peripheral search) or to interrupt the measurement and inform the user via an alarm about the alignment failure, for example. In order to perform the process, it is necessary to determine whether the alignment pattern is present in the image. For the determination, a matching score in template matching (such as a correlation value in normalized correlation computation) is used, for example. If the matching score is greater than a pre-set reference value (which may be hereafter referred to as “score acceptance”), it is determined that the pattern is present in the field of view; if the matching score is lower than the score acceptance, it is determined that the pattern is absent.
The template matching method can be categorized into an image-based method by normalized correlation and the like, and a feature point-based technique comparing feature points extracted from images. In the former, image-based technique, an image of the same size as the template is cut out from a searched image, for example, and a correlation value between the cut-out image and the template is calculated. The correlation value is calculated for each image position cut out from the searched image (the position may be the entire searched image), and the position with a large correlation value is determined as a matching position (Non Patent Literature 1). On the other hand, in the latter, feature point-based technique, a plurality of feature points is extracted from each of the template and the searched image, and similar feature points are found out from the both images (corresponding point matching), for example. And the matching position is determined at a position at which the number of overlaps in projected regions is increased when the template is projected such that the feature points are overlapped (taking into consideration rotation and different scales and the like between the images) (Non Patent Literature 2).